package com.hbsi.demo2;

/**
 * @author 程奕红
 * @version 1.0
 */
public class Person {
    private String name;
    int age;
    public String address;

    public Person() {
    }
    private Person(String name) {
        this.name=name;
    }

     Person(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public Person(String name, int age, String address) {
        this.name = name;
        this.age = age;
        this.address = address;
    }

    public void show(){//无参返回值
        System.out.println("show");
    }
    public void method(String s){//有参无返回值
        System.out.println("method:"+s);
    }
    public String getString(String s,int i){
        return s+"==="+i;
    }
    private void function(){
        System.out.println("function");
    }

    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", address='" + address + '\'' +
                '}';
    }
    public static void display(){
        System.out.println("display");
    }
}
